﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SilkeyERP.Model
{
    public partial class BuyPriceList
    {
        public void SetNextAvailableBuyPriceListCode()
        {
            using (var context = new SilkeyERPEntities())
            {
                BuyPriceListCode = context.BuyPriceList.OrderBy(x => x.BuyPriceListCode).ToList().Last().BuyPriceListCode + 1;
            }
        }
    }
}
